home *** CD-ROM | disk | FTP | other *** search
/ Nejlepší hry / Nejlepsi hry.iso / hry / 6zenichu / 6+1 install_txt.exe / 6 zenichu a 1 navic.exe / scripts / DefineButton2_1571 / BUTTONCONDACTION on(release).as next >
Encoding:
Text File  |  2003-11-28  |  7.2 KB  |  250 lines

  1. on(release){
  2.    x = Math.round((this._x + 10.2) / 51.2) - 1;
  3.    if(_root.draglej == _root.itembar[x + _root.iboffset])
  4.    {
  5.       stopDrag();
  6.       _root.swappredmety.swapDepths("_root.i" add _root.draglej);
  7.       _root.draglej = 0;
  8.       _root.itembar_refresh();
  9.    }
  10.    else if(_root.draglej == 0)
  11.    {
  12.       if(_root.itembar[x + _root.iboffset] == 57)
  13.       {
  14.          if(_root.d22 & _root.naX(3) && _root._currentframe == _root.INDIANFRAME)
  15.          {
  16.             _root.stopdragall();
  17.             _root.itembar_remove(57);
  18.             _root.ii56 = 3;
  19.             _root.d_venca.l = "mon_067_100";
  20.             _root.d_venca.i = "go";
  21.             _root.hideall();
  22.          }
  23.          else
  24.          {
  25.             _root.d_venca.l = "mon_067_" add random(5) add "_100";
  26.             _root.d_venca.i = "go";
  27.             _root.hideall();
  28.          }
  29.       }
  30.       else
  31.       {
  32.          _root.draglej = _root.itembar[x + _root.iboffset];
  33.          _root.swappredmety.swapDepths("_root.i" add _root.draglej);
  34.          startDrag("_root.i" add _root.itembar[x + _root.iboffset],0);
  35.       }
  36.    }
  37.    else if(_root.draglej == 5 && _root.itembar[x + _root.iboffset] == 23)
  38.    {
  39.       if(_root.d04 & _root.naX(5))
  40.       {
  41.          _root.itembar[x + _root.iboffset] = 29;
  42.          _root.stopdragall();
  43.       }
  44.       else
  45.       {
  46.          if(random(2) == 0)
  47.          {
  48.             _root.d_venca.l = "mon_022a_100";
  49.          }
  50.          else
  51.          {
  52.             _root.d_venca.l = "mon_022b_100";
  53.          }
  54.          _root.d_venca.i = "go";
  55.          _root.stopdragall();
  56.          _root.hideall();
  57.       }
  58.    }
  59.    else if(_root.draglej == 23 && _root.itembar[x + _root.iboffset] == 5)
  60.    {
  61.       if(_root.d04 & _root.naX(5))
  62.       {
  63.          _root.stopdragall();
  64.          _root.itembar_remove(23);
  65.          _root.itembar_add(29);
  66.       }
  67.       else
  68.       {
  69.          if(random(2) == 0)
  70.          {
  71.             _root.d_venca.l = "mon_022a_100";
  72.          }
  73.          else
  74.          {
  75.             _root.d_venca.l = "mon_022b_100";
  76.          }
  77.          _root.d_venca.i = "go";
  78.          _root.stopdragall();
  79.          _root.hideall();
  80.       }
  81.    }
  82.    else if(_root.draglej == 5 && _root.itembar[x + _root.iboffset] == 54)
  83.    {
  84.       _root.itembar[x + _root.iboffset] = 19;
  85.       _root.stopdragall();
  86.       _root.d_venca.l = "mon_042_100";
  87.       _root.d_venca.i = "go";
  88.       _root.ii19 = 3;
  89.       _root.hideall();
  90.    }
  91.    else if(_root.draglej == 54 && _root.itembar[x + _root.iboffset] == 5)
  92.    {
  93.       _root.stopdragall();
  94.       _root.itembar_remove(54);
  95.       _root.itembar_add(19);
  96.       _root.d_venca.l = "mon_042_100";
  97.       _root.d_venca.i = "go";
  98.       _root.ii19 = 3;
  99.       _root.hideall();
  100.    }
  101.    else if(_root.draglej == 28 && _root.itembar[x + _root.iboffset] == 29)
  102.    {
  103.       _root.stopdragall();
  104.       _root.itembar[x + _root.iboffset] = 29;
  105.       _root.itembar_remove(28);
  106.       _root.ii28 = 2;
  107.       _root.d_venca.l = "mon_023_100";
  108.       _root.d_venca.i = "go";
  109.       _root.hideall();
  110.    }
  111.    else if(_root.draglej == 29 && _root.itembar[x + _root.iboffset] == 28)
  112.    {
  113.       _root.stopdragall();
  114.       _root.itembar[x + _root.iboffset] = 29;
  115.       _root.itembar_remove(29);
  116.       _root.ii28 = 2;
  117.       _root.d_venca.l = "mon_023_100";
  118.       _root.d_venca.i = "go";
  119.       _root.hideall();
  120.    }
  121.    else if(_root.draglej == 28 && _root.itembar[x + _root.iboffset] == 23)
  122.    {
  123.       _root.stopdragall();
  124.       _root.itembar[x + _root.iboffset] = 23;
  125.       _root.itembar_remove(28);
  126.       _root.ii28 = 2;
  127.       _root.d_venca.l = "mon_023_100";
  128.       _root.d_venca.i = "go";
  129.       _root.hideall();
  130.    }
  131.    else if(_root.draglej == 23 && _root.itembar[x + _root.iboffset] == 28)
  132.    {
  133.       _root.stopdragall();
  134.       _root.itembar[x + _root.iboffset] = 23;
  135.       _root.itembar_remove(23);
  136.       _root.ii28 = 2;
  137.       _root.d_venca.l = "mon_023_100";
  138.       _root.d_venca.i = "go";
  139.       _root.hideall();
  140.    }
  141.    else if(_root.draglej == 1 && _root.itembar[x + _root.iboffset] == 47)
  142.    {
  143.       _root.stopdragall();
  144.       _root.itembar_remove(1);
  145.       _root.itembar_add(48);
  146.       _root.d_venca.l = "mon_057_100";
  147.       _root.d_venca.i = "go";
  148.       _root.hideall();
  149.    }
  150.    else if(_root.draglej == 47 && _root.itembar[x + _root.iboffset] == 1)
  151.    {
  152.       _root.stopdragall();
  153.       _root.itembar[x + _root.iboffset] = 48;
  154.       _root.itembar_refresh();
  155.       _root.d_venca.l = "mon_057_100";
  156.       _root.d_venca.i = "go";
  157.       _root.hideall();
  158.    }
  159.    else if(_root.draglej == 4 && _root.itembar[x + _root.iboffset] == 39)
  160.    {
  161.       _root.stopdragall();
  162.       _root.itembar[x + _root.iboffset] = 53;
  163.       _root.itembar_remove(4);
  164.       _root.ii4 = 3;
  165.       _root.d_venca.l = "mon_054_100";
  166.       _root.d_venca.i = "go";
  167.       _root.hideall();
  168.    }
  169.    else if(_root.draglej == 39 && _root.itembar[x + _root.iboffset] == 4)
  170.    {
  171.       _root.stopdragall();
  172.       _root.itembar[x + _root.iboffset] = 53;
  173.       _root.itembar_remove(39);
  174.       _root.ii4 = 3;
  175.       _root.d_venca.l = "mon_054_100";
  176.       _root.d_venca.i = "go";
  177.       _root.hideall();
  178.    }
  179.    else if(_root.draglej == 30 && _root.itembar[x + _root.iboffset] == 35)
  180.    {
  181.       _root.stopdragall();
  182.       _root.itembar[x + _root.iboffset] = 32;
  183.       _root.itembar_remove(30);
  184.       _root.ii35 = 2;
  185.    }
  186.    else if(_root.draglej == 35 && _root.itembar[x + _root.iboffset] == 30)
  187.    {
  188.       _root.stopdragall();
  189.       _root.itembar[x + _root.iboffset] = 32;
  190.       _root.itembar_remove(35);
  191.       _root.ii35 = 2;
  192.    }
  193.    else if(_root.draglej == 36 && _root.itembar[x + _root.iboffset] == 32)
  194.    {
  195.       _root.stopdragall();
  196.       _root.itembar[x + _root.iboffset] = 34;
  197.       _root.itembar_remove(36);
  198.       _root.ii36 = 2;
  199.    }
  200.    else if(_root.draglej == 32 && _root.itembar[x + _root.iboffset] == 36)
  201.    {
  202.       _root.stopdragall();
  203.       _root.itembar[x + _root.iboffset] = 34;
  204.       _root.itembar_remove(32);
  205.       _root.ii36 = 2;
  206.    }
  207.    else if(_root.draglej == 37 && _root.itembar[x + _root.iboffset] == 32)
  208.    {
  209.       _root.stopdragall();
  210.       _root.itembar[x + _root.iboffset] = 33;
  211.       _root.itembar_remove(37);
  212.       _root.ii37 = 2;
  213.    }
  214.    else if(_root.draglej == 32 && _root.itembar[x + _root.iboffset] == 37)
  215.    {
  216.       _root.stopdragall();
  217.       _root.itembar[x + _root.iboffset] = 33;
  218.       _root.itembar_remove(32);
  219.       _root.ii37 = 2;
  220.    }
  221.    else if(_root.draglej == 36 && _root.itembar[x + _root.iboffset] == 33)
  222.    {
  223.       _root.stopdragall();
  224.       _root.itembar[x + _root.iboffset] = 31;
  225.       _root.itembar_remove(36);
  226.       _root.ii36 = 2;
  227.    }
  228.    else if(_root.draglej == 33 && _root.itembar[x + _root.iboffset] == 36)
  229.    {
  230.       _root.stopdragall();
  231.       _root.itembar[x + _root.iboffset] = 31;
  232.       _root.itembar_remove(33);
  233.       _root.ii36 = 2;
  234.    }
  235.    else if(_root.draglej == 37 && _root.itembar[x + _root.iboffset] == 34)
  236.    {
  237.       _root.stopdragall();
  238.       _root.itembar[x + _root.iboffset] = 31;
  239.       _root.itembar_remove(37);
  240.       _root.ii37 = 2;
  241.    }
  242.    else if(_root.draglej == 34 && _root.itembar[x + _root.iboffset] == 37)
  243.    {
  244.       _root.stopdragall();
  245.       _root.itembar[x + _root.iboffset] = 31;
  246.       _root.itembar_remove(34);
  247.       _root.ii37 = 2;
  248.    }
  249. }
  250.